GrossFullWithdrawal
This assignment does not accept allocation instructions. Instead, an amount equal to the prorata percentage of each fund to the sum total of those funds is removed. If deposit tracking, value is removed in FIFO order. The total removed from the funds must match the sum of the MoneyTypes and the sum of the cash values removed from the fund's deposits must match the expected fund removal amounts. MoneyType values must be negative.
When processing a precedence where Indexed funds are present, all funds must be indexed funds and all removal methods in the precedence must be the same. Some removal methods do not apply to non-indexed funds.
A. Order funds in an Removal Precedence ascending order
B. The assignment's "remaining MoneyType value" is set to the sum total of the MoneyTypes.
C. For each precedence,
- The precedence's "remaining MoneyType value" is the lesser of the assignment's "remaining MoneyType value" and the total value of all fund cash values in this precedence.
- if indexed funds are contained in this precedence,
- If removal method is ProRata,
- Order the policy's indexed funds in this precedence.
- For each fund,
- Calculated the prorata percentage: fund value / sum of fund values.
- Apply the percentage to the precedence's "remaining MoneyType value" and round to the currency rules. This is the fund's "removal amount".
- The last fund is adjusted so that the sum total of fund removals is equal to the precedence's "remaining MoneyType value".
- Order buckets in the fund descending (LIFO) order by bucket effective date.[1]
- For each bucket,
- Calculate prorata "percent": bucket's cash value / fund's cash values
- Calculate bucket's "removal amount" as the fund's "removal amount" X "percent" and round to the currency definition.
- The last bucket's "removal amount" is adjusted so that the sum total of bucket "removal amounts" is equal to the fund's "removal amount".
- "Remaining removal amount" is set to the bucket's "removal amount".
- For each of the bucket's deposits in FIFO order,
- Calculate "deposit removal" as the lesser of the deposit's value and the bucket's "remaining removal amount".
Decrement the "remaining removal amount" by the "deposit removal".
- if the "remaining removal amount" is 0, looping through the deposits is complete.
- If removal method is PureLIFO,
- Order all buckets with funds in the precedence in descending (LIFO) order by bucket effective date.
- For each bucket,
- Calculate the bucket's "removal amount" as the lesser of the bucket's cash value and the precedence's "remaining MoneyType value".
- Order funds within the bucket.
- For each fund,
- Calculate prorata "percent": fund cash value / bucket's cash value.
- Calculate fund's "removal amount" as the bucket's "removal amount" X "percent" and round to the currency definition.
- The last fund's "removal amount" is adjusted so that the sum total of fund "removal amounts" is equal to the bucket's "removal amount".
- "Remaining removal amount" is set to the fund's "removal amount".
- For each of the fund's deposits in FIFO order,
- Calculate "deposit removal" as the lesser of the deposit's value and the fund's "remaining removal amount".
- Decrement the "remaining removal amount" by the "deposit removal".
- if the "remaining removal amount" is 0, looping through the deposits is complete.
- If removal method is ProRataLIFO,[2]
- Order the policy's indexed funds in this precedence.
- For each fund,
- Calculated the prorata percentage: fund value / sum of fund values.
- Apply the percentage to the precedence's "remaining MoneyType value" and round to the currency rules. This is the fund's "removal amount".
- The last fund is adjusted so that the sum total of fund removals is equal to the precedence's "remaining MoneyType value".
- Order buckets in the fund descending (LIFO) order by bucket effective date.
- For each bucket,
- Calculate the bucket's "removal amount" as the lesser of the bucket's cash value and the fund's "removal amount".
- "Remaining removal amount" is set to the bucket's "removal amount".
- For each of the bucket's deposits in FIFO order,
- Calculate "deposit removal" as the lesser of the deposit's value and the bucket's "remaining removal amount".
- Decrement the "remaining removal amount" by the "deposit removal".
- if the "remaining removal amount" is 0, looping through the deposits is complete.
- If removal method is ProRata,
-
Otherwise,
-
Order the policy's funds in this precedence.
-
For each fund,
-
Calculated the prorata percentage: fund value / sum of fund values.
-
Apply the percentage to the precedence's "remaining MoneyType value" and round to the currency rules. This is the fund's "removal amount".
-
The last fund is adjusted so that the sum total of fund removals is equal to the precedence's "remaining MoneyType value".
-
-
For each fund in this precedence in reverse order,
-
If the fund's "removal amount" is greater than the fund's value, accumulate the difference and make "removal amount" equal to the fund's value. This is the "accumulated difference".
-
If the fund's value is greater than its "removal amount", add as much of the "accumulated difference" to the "removal amount" as the fund's value will allow and adjust the "accumulated difference" by what the fund's value allowed.
-
-
By the end of the loop, error if the "accumulated difference" is greater than 0.
-
For each fund in this precedence in original order,
-
Calculate "allocation percent" as "removal amount" / "remaining MoneyType value".
-
For the last fund, "allocation percent" is adjusted so the sum of all "allocation percents" is 1.
-
-
For each non-zero value MoneyType in the order configured,
-
For each fund in this precedence in original order,
-
if the last non-zero value MoneyType
-
Calculate the amount to remove from the fund as the difference of fund's "removal amount" and the fund's "distributed amount".
-
-
- otherwise,
- Calculate the fund's "removal amount" per MoneyType and round to the currency definition: "allocation percent" X MoneyType value.
- The last fund is adjusted so the sum of the "removal amount" values equals the MoneyType value.
- Accumulate the "removal amount". This is the "distributed amount".
- If tracking by fund, the "removal amount" becomes a FundValuationEffect record.
- An ending FundValue record is affected by the "removal amount".
- "Remaining removal amount" is set to the fund's "removal amount".
- If tracking by deposit,
- For each of the fund's deposits in LIFO or FIFO order,
- Calculate "deposit removal" as the lesser of the deposit's value and the fund's "remaining removal amount".
- Decrement the "remaining removal amount" by the "deposit removal".
- if the "remaining removal amount" is 0, looping through the deposits is complete.
- For each of the fund's deposits in LIFO or FIFO order,
-
-
- The assignment's "remaining MoneyType value" is reduced by the precedence's "remaining MoneyType value".
D. If tracking by deposit,
- For each removal amount from a deposit,
- A new DepositValuationEffect record persists the amount of change in a fund’s value and maintains tracking by seed deposit, money type code, bucket (where applicable) and deposit date in the fund.
- If the fund is variable and the cash value of the remaining units is less than the smallest denomination of the currency, remove all units.
- A new DepositValuationEffect record persists the amount of change in a fund’s value and maintains tracking by seed deposit, money type code, bucket (where applicable) and deposit date in the fund.
- An ending DepositValue record is created to reflect the ending balances of the deposit’s CashValue, RawCashValue and Units.
- An ending record will exist for every beginning DepositValue record.
- The difference between beginning and ending record values is the change persisted in the DepositValuationEffect record for the same fund, seed deposit, money type code bucket (where applicable) and deposit date.
- An ending FundValue record is created to reflect the ending balances of the fund's CashValue, RawCashValue and Units.
- If rounding level is deposit, CashValue is the sum of rounded cash value from the fund's ending DepositValue records.
- If rounding level is fund, CashValue is the sum of unrounded cash value from the fund's ending DepositValue records. The result is rounded to currency definition.
- Units and RawCashValue are the sum of the units and raw cash values, respectively, from the fund's ending DepositValue records.
E. If not tracking funds by deposit,
- A FundValuationEffect record persists the amount of change in a fund’s value.
- If the fund is variable and the cash value of the remaining units is less than the smallest denomination of the currency, remove all units.
- An ending FundValue record is created to reflect the fund's ending balances.
- An ending record will exist for every beginning FundValue record.
- The difference between beginning and ending record values is the fund's changes persisted in the FundValuationEffect record.